package com.bitin.common.constant;

import lombok.Getter;

/**
 * 性别
 *
 * @Author: Mr.Lu
 * @Datetime 2024/8/13 21:55
 */
@Getter
public enum Gender {

    MALE("男"),
    FEMALE("女"),
    UNKNOWN("未知")
    ;

    private final String display;

    Gender(String display) {
        this.display = display;
    }

    public static Gender resolve(String genderStr) {
        for (Gender gender : values()) {
            if (gender.display.equals(genderStr)) {
                return gender;
            }
        }
        return null;
    }
}
